CSharpTest.Net
CreateBytes(Byte[]) Method
See Also  Example Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Crypto Namespace > Salt Class > CreateBytes Method : CreateBytes(Byte[]) Method

bits

Glossary Item Box

Creates n bytes of data usable as a salt

Syntax

Visual Basic (Declaration) 
Public Overloads Shared Sub CreateBytes( _
   ByVal bits() As Byte _
) 
C# 
public static void CreateBytes( 
   byte[] bits
)

Parameters

bits

Example

Library/Library.Test/TestSalt.cs

C#Copy Code
byte[] test = new byte[16];
Assert.AreEqual(new byte[16], test);
Salt.CreateBytes(test);
Assert.AreNotEqual(new byte[16], test);
Assert.AreNotEqual(Salt.CreateBytes(Salt.Size.b128), test);
VB.NETCopy Code
Dim test As Byte() = New Byte(16) {}
Assert.AreEqual(New Byte(16) {}, test)
Salt.CreateBytes(test)
Assert.AreNotEqual(New Byte(16) {}, test)
Assert.AreNotEqual(Salt.CreateBytes(Salt.Size.b128), test)

Requirements

Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7

See Also

Generated with Document! X 2011 by Innovasys